package com.zone.module_base.di

import androidx.lifecycle.ViewModel
import com.zone.core.id.ViewModelKey
import com.zone.module_base.viewmodel.TestActivityVM
import com.zone.module_base.viewmodel.TestFunctionViewModel
import com.zone.module_base.viewmodel.TestVideoViewModel
import dagger.Module
import dagger.Provides
import dagger.multibindings.IntoMap

/**
 *Author: last
 *Time: 2020/5/2
 *Description: xxx
 */
@Module
class VMModule {

    @Provides
    @IntoMap
    @ViewModelKey(TestActivityVM::class)
    fun getBaseActivityVM(): ViewModel {
        return TestActivityVM("TestActivityVM==============================11==")
    }

    @Provides
    @IntoMap
    @ViewModelKey(TestFunctionViewModel::class)
    fun getTestFunctionViewModel(): ViewModel {
        return TestFunctionViewModel("TestFunctionViewModel==============================22==")
    }

    @Provides
    @IntoMap
    @ViewModelKey(TestVideoViewModel::class)
    fun getTestVideoViewModel(): ViewModel {
        return TestVideoViewModel("DataHttpRepository")
    }

}